package com.diors.commons.thread.task;

import org.apache.log4j.Logger;

/**
 * 任务超类
 * @author	darren.ouyang <ouyang.darren@gmail.com>
 * @date	2013-10-22
 * @version 1.0
 * @copyright Copyright (c) 2013, darren.ouyang
 */
public abstract class Action implements Runnable
{

	protected final Logger log = Logger.getLogger(getClass());
	
	@Override
	public void run() 
	{
		try 
		{
			execute();
		}
		catch (Exception e)
		{
			log.warn("线程运行时，出现的异常", e);
		}
	}
	
	protected abstract void execute();
}